<?php
$this->pageTitle=Yii::app()->name . ' - Login';
$this->breadcrumbs=array(
	'Login',
);
?>

<h1>Login</h1>
<?php if(Yii::app()->user->hasFlash('unauth')): ?>
    <div class="flash-error">
        <?php echo Yii::app()->user->getFlash('unauth'); ?>
    </div>
<?php endif; ?>
<p>Please fill out the following form with your login credentials:</p>
<?php if(CHtml::errorSummary($model)): ?>
    <div class="flash-error">
        <?php echo CHtml::errorSummary($model); ?>
    </div> 
<?php endif; ?>
<div class="form">
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'login-form',
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
)); ?>
	<p class="note">Fields with <span class="required">*</span> are required.</p>
	<div class="row">
		<?php echo $form->label($model,'usernameOrEmail'); ?>
		<?php echo $form->textField($model,'usernameOrEmail'); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'password'); ?>
		<?php echo $form->passwordField($model,'password'); ?>
		<p class="hint">
            Use your username or password can login to the system
		</p>
	</div>
    <!--
	<div class="row rememberMe">
		<?php echo $form->checkBox($model,'rememberMe'); ?>
		<?php echo $form->label($model,'rememberMe'); ?>
	</div>
    -->
	<div class="row buttons">
		<?php echo CHtml::submitButton('Login'); ?>
	</div>
<?php $this->endWidget(); ?>
</div><!-- form -->
